package cn.tedu.cake.shop.product.pojo.param;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
public class BreadAddNewParam implements Serializable {

    @NotNull(message = "添加面包失败,面包标题不能为空")
    @ApiModelProperty(value = "标题",required = true,example = "面包1")
    private String title;

    @NotNull(message = "添加面包失败,面包简介不能为空")
    @ApiModelProperty(value = "简介",required = true,example = "面包简介")
    private String des;

    @NotNull(message = "添加面包失败,面包详情信息不能为空")
    @ApiModelProperty(value = "面包详情信息",required = true,example = "这是一个好吃的面包")
    private String info;

    @NotNull(message = "添加面包失败,面包价格不能为空")
    @Range(message = "添加面包失败,面包价格必须大于0")
    @ApiModelProperty(value = "面包价格",required = true,example = "5")
    private BigDecimal price;

    @NotNull(message = "添加面包失败,面包图片链接不能为空")
    @ApiModelProperty(value = "面包图片链接",required = true,example = "http://wwww.baidu.com")
    private String url;

    @NotNull(message = "添加面包失败,面包所属种类不能为空")
    @Range(message = "添加面包失败,面包所属种类必须大于0")
    @ApiModelProperty(value = "所属种类",required = true,example = "2")
    private Integer typeId;
}
